/* ==========================================================
   Brandywine Tree & Shrub — Components
   ========================================================== */

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-sm);
  padding: 0.85em 2em;
  font-family: var(--ff-heading);
  font-size: var(--fs-small);
  font-weight: var(--fw-semi);
  letter-spacing: 0.03em;
  text-decoration: none;
  border-radius: var(--radius-full);
  transition: all var(--dur-normal) var(--ease-out);
  white-space: nowrap;
  cursor: pointer;
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity var(--dur-normal) var(--ease-out);
}

.btn:hover::before {
  opacity: 1;
}

.btn-primary {
  background: var(--clr-cta);
  color: var(--white);
}

.btn-primary::before {
  background: var(--clr-cta-hover);
}

.btn-primary:hover {
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(233, 62, 63, 0.35);
}

.btn-secondary {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.5);
}

.btn-secondary:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--white);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--clr-primary);
  border-color: var(--clr-primary);
}

.btn-outline:hover {
  background: var(--clr-primary);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-green {
  background: var(--canopy);
  color: var(--white);
}

.btn-green::before {
  background: var(--forest);
}

.btn-green:hover {
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(74, 124, 40, 0.35);
}

.btn span {
  position: relative;
  z-index: 1;
}

.btn svg {
  position: relative;
  z-index: 1;
  width: 1.1em;
  height: 1.1em;
  flex-shrink: 0;
}

/* ── Navbar ── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: var(--sp-md) 0;
  transition: all var(--dur-normal) var(--ease-out);
}

.navbar.scrolled {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: 0 1px 20px rgba(0,0,0,0.08);
  padding: var(--sp-sm) 0;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-xl);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo-icon {
  width: 44px;
  height: 44px;
  overflow: visible;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.18));
  transition: transform var(--dur-normal) var(--ease-spring);
}

.logo-disc {
  fill: var(--forest);
}

.logo-tree {
  fill: var(--leaf-light);
}

.nav-logo:hover .nav-logo-icon {
  transform: translateY(-1px) scale(1.025);
}

.nav-logo-text {
  display: flex;
  flex-direction: column;
  font-family: var(--ff-body);
  color: var(--white);
  line-height: 1;
}

.nav-logo-text strong {
  font-size: 1.22rem;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.nav-logo-text small {
  display: block;
  margin-top: 0.3rem;
  color: var(--leaf-light);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  line-height: 1;
  text-transform: uppercase;
}

.navbar.scrolled .nav-logo-text {
  color: var(--charcoal);
}

.navbar.scrolled .nav-logo-text small {
  color: var(--canopy);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--sp-xs);
}

.nav-link {
  padding: var(--sp-sm) var(--sp-md);
  font-family: var(--ff-heading);
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: all var(--dur-fast) var(--ease-out);
  position: relative;
}

.nav-link:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
}

.navbar.scrolled .nav-link {
  color: var(--clr-text-muted);
}

.navbar.scrolled .nav-link:hover {
  color: var(--clr-primary);
  background: rgba(74, 124, 40, 0.08);
}

.nav-cta {
  margin-left: var(--sp-sm);
}

.nav-phone {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: 0.35rem 0.9rem 0.35rem 0.4rem;
  font-family: var(--ff-heading);
  font-size: var(--fs-small);
  font-weight: var(--fw-semi);
  color: var(--white);
  text-decoration: none;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--ember), #d95f24);
  border: 1px solid rgba(255, 255, 255, 0.32);
  box-shadow: 0 7px 18px rgba(198, 78, 25, 0.3);
  transition: all var(--dur-fast) var(--ease-out);
}

.nav-phone:hover {
  color: var(--white);
  background: linear-gradient(135deg, #de6329, var(--ember));
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow: 0 9px 22px rgba(198, 78, 25, 0.42);
  transform: translateY(-1px);
}

.navbar.scrolled .nav-phone {
  color: var(--white);
  background: linear-gradient(135deg, var(--ember), #d95f24);
  border-color: rgba(198, 78, 25, 0.35);
}

.nav-phone span {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.nav-phone small {
  font-family: var(--ff-body);
  font-size: 0.62rem;
  font-weight: var(--fw-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.88;
}

.nav-phone strong {
  font-size: 0.9rem;
  letter-spacing: 0.015em;
}

.nav-phone svg {
  box-sizing: content-box;
  width: 1.05em;
  height: 1.05em;
  padding: 0.45rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
}

/* ── Hamburger ── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--white);
  border-radius: var(--radius-full);
  transition: all var(--dur-normal) var(--ease-out);
  transform-origin: center;
}

.navbar.scrolled .hamburger span {
  background: var(--charcoal);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ── Service Card ── */
.service-card {
  background: var(--clr-surface);
  border-radius: var(--radius-lg);
  padding: 0 0 var(--sp-xl);
  box-shadow: var(--shadow-sm);
  transition: all var(--dur-normal) var(--ease-out);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--gray-200);
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--canopy), var(--leaf));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-normal) var(--ease-out);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-card-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(74,124,40,0.1), rgba(143,184,88,0.1));
  margin: var(--sp-lg) var(--sp-2xl) var(--sp-lg);
  color: var(--canopy);
  transition: all var(--dur-normal) var(--ease-out);
}

.service-card:hover .service-card-icon {
  background: linear-gradient(135deg, var(--canopy), var(--leaf));
  color: var(--white);
  transform: scale(1.05);
}

.service-card-icon svg {
  width: 28px;
  height: 28px;
}

.service-card h3 {
  margin: 0 var(--sp-2xl) var(--sp-md);
  font-size: var(--fs-h3);
}

.service-card p {
  margin-inline: var(--sp-2xl);
  color: var(--clr-text-muted);
  font-size: var(--fs-small);
  line-height: var(--lh-body);
}

.service-card-features {
  margin: var(--sp-lg) var(--sp-2xl) 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-sm);
}

.service-card-media {
  height: 180px;
  overflow: hidden;
}

.service-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease-out);
}

.service-card:hover .service-card-media img {
  transform: scale(1.06);
}

.service-card-actions {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--sp-md);
  margin: var(--sp-xl) var(--sp-2xl) 0;
  padding-top: var(--sp-md);
  border-top: 1px solid var(--gray-200);
}

.service-card-actions a {
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
}

.service-card-actions a:last-child {
  color: var(--ember);
  flex-shrink: 0;
}

.service-card-details {
  flex: 1;
  min-width: 0;
}

.service-card-details summary {
  color: var(--clr-primary);
  cursor: pointer;
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  list-style-position: inside;
}

.service-card-details[open] summary {
  margin-bottom: var(--sp-sm);
}

.service-card-details div {
  color: var(--clr-text-muted);
  font-size: var(--fs-xs);
  line-height: 1.55;
}

.mobile-action-bar {
  display: none;
}

.service-card-features span {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  font-size: var(--fs-xs);
  color: var(--clr-primary);
  background: rgba(74, 124, 40, 0.06);
  padding: 0.3em 0.7em;
  border-radius: var(--radius-full);
}

/* ── Trust Badge ── */
.trust-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--sp-sm);
  padding: var(--sp-md);
}

.trust-badge-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.15);
  color: var(--leaf-light);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.trust-badge-icon svg {
  width: 24px;
  height: 24px;
}

.trust-badge-text {
  font-family: var(--ff-heading);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semi);
  color: var(--white);
  letter-spacing: 0.03em;
  line-height: var(--lh-tight);
}

/* ── Form Elements ── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--sp-xs);
}

.form-label {
  font-family: var(--ff-heading);
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  color: var(--clr-text);
}

.form-input,
.form-select,
.form-textarea {
  padding: 0.8em 1em;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-size: var(--fs-body);
  background: var(--white);
  transition: all var(--dur-fast) var(--ease-out);
  width: 100%;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--clr-primary);
  box-shadow: 0 0 0 3px rgba(74, 124, 40, 0.12);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--gray-400);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1em center;
  padding-right: 2.5em;
}

/* ── Social Icons ── */
.social-link {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  transition: all var(--dur-normal) var(--ease-out);
  text-decoration: none;
}

.social-link:hover {
  background: var(--leaf);
  color: var(--white);
  transform: translateY(-3px);
}

.social-link svg {
  width: 20px;
  height: 20px;
}

/* ── Responsive: Mobile Nav ── */
@media (max-width: 900px) {
  .hamburger {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    width: min(320px, 85vw);
    height: 100dvh;
    flex-direction: column;
    align-items: stretch;
    padding: 5rem var(--sp-xl) var(--sp-xl);
    background: var(--glass-bg-dark);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    transform: translateX(100%);
    transition: transform var(--dur-slow) var(--ease-out);
    gap: var(--sp-xs);
    z-index: 1000;
  }

  .nav-links.open {
    transform: translateX(0);
  }

  .nav-link {
    color: rgba(255, 255, 255, 0.9);
    padding: var(--sp-md);
    font-size: 1rem;
  }

  .nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
  }

  .nav-cta {
    margin-left: 0;
    margin-top: var(--sp-md);
  }

  .nav-phone {
    justify-content: flex-start;
    color: var(--white);
    padding: 0.55rem 0.85rem 0.55rem 0.55rem;
    margin-top: var(--sp-sm);
  }

  .mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--dur-normal) var(--ease-out);
  }

  .mobile-overlay.active {
    opacity: 1;
    pointer-events: auto;
  }
}

@media (max-width: 768px) {
  .mobile-action-bar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 8500;
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    gap: 1px;
    padding: 0 0 env(safe-area-inset-bottom);
    background: var(--white);
    border-top: 1px solid var(--gray-200);
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.12);
  }

  .mobile-action-bar a {
    min-height: 62px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: var(--white);
    line-height: 1.15;
    text-align: center;
  }

  .mobile-action-bar span {
    font-size: 0.68rem;
    font-weight: var(--fw-bold);
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .mobile-action-bar strong {
    font-family: var(--ff-heading);
    font-size: 0.95rem;
  }

  .mobile-action-emergency { background: var(--ember); }
  .mobile-action-estimate { background: var(--canopy); }

  .service-card-actions {
    gap: var(--sp-sm);
  }
}
